﻿<phone:PhoneApplicationPage
    x:Class="CompanyHub.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prim="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    xmlns:utilities="clr-namespace:CompanyHub.Utilities"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.Resources>
            <utilities:DebugConverter x:Key="debugConv"/>
            <Style x:Key="NonParalaxPanorama" TargetType="phone:Panorama">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="phone:Panorama">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <utilities:NoParalaxBackgroundLayer x:Name="BackgroundLayer" 
                 HorizontalAlignment="Left" Grid.RowSpan="2">
                                    <Border x:Name="background" 
                    Background="{TemplateBinding Background}" 
                    CacheMode="BitmapCache"/>
                                </utilities:NoParalaxBackgroundLayer>
                                <utilities:NoParalaxTitleLayer x:Name="TitleLayer" 
                 CacheMode="BitmapCache" 
                 ContentTemplate="{TemplateBinding TitleTemplate}" 
                 Content="{TemplateBinding Title}" 
                 FontSize="187" 
                 FontFamily="{StaticResource PhoneFontFamilyLight}" 
                 HorizontalAlignment="Left" 
                 Margin="10,-76,0,9" Grid.Row="0"/>
                                <prim:PanningLayer x:Name="ItemsLayer" 
                 HorizontalAlignment="Left" Grid.Row="1">
                                    <ItemsPresenter x:Name="items"/>
                                </prim:PanningLayer>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <!-- LOCALIZATION NOTE:
            To localize the displayed strings copy their values to appropriately named
            keys in the app's neutral language resource file (AppResources.resx) then
            replace the hard-coded text value between the attributes' quotation marks
            with the binding clause whose path points to that string name.

            For example:

                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"

            This binding points to the template's string resource named "ApplicationTitle".

            Adding supported languages in the Project Properties tab will create a
            new resx file per language that can carry the translated values of your
            UI strings. The binding in these examples will cause the value of the
            attributes to be drawn from the .resx file that matches the
            CurrentUICulture of the app at run time.
         -->

        <!--Panorama control-->
<phone:Panorama Title="my company hub">
    <phone:Panorama.Resources>
        <DataTemplate x:Key="listItemTemplate">
            <StackPanel Margin="0,-6,0,12" Orientation="Horizontal">
                <Image  Source="{Binding Thumbnail, Converter={StaticResource debugConv}}"/>
                <TextBlock Text="{Binding Title}" TextWrapping="Wrap" VerticalAlignment="Center" 
                            Style="{StaticResource PhoneTextExtraLargeStyle}" 
                            FontSize="{StaticResource PhoneFontSizeExtraLarge}"/>
            </StackPanel>
        </DataTemplate>
    </phone:Panorama.Resources>

    <!--Panorama New Apps-->
    <phone:PanoramaItem Header="New Apps">
        <!--Single line list with text wrapping-->
        <phone:LongListSelector Margin="0,0,-22,0" ItemsSource="{Binding NewPackages}" 
                                SelectionChanged="ItemSelected" 
                                ItemTemplate="{StaticResource listItemTemplate}"/>
    </phone:PanoramaItem>

    <!--Panorama Update Apps-->
    <phone:PanoramaItem Header="Update Apps">
        <!--Single line list with text wrapping-->
        <phone:LongListSelector Margin="0,0,-22,0" ItemsSource="{Binding UpdatePackages}"
                                SelectionChanged="ItemSelected" 
                                ItemTemplate="{StaticResource listItemTemplate}"/>
    </phone:PanoramaItem>

    <!--Panorama Installed Apps-->
    <phone:PanoramaItem Header="Installed Apps">
        <!--Single line list with text wrapping-->
        <phone:LongListSelector Margin="0,0,-22,0" ItemsSource="{Binding InstalledPackages}"
                                SelectionChanged="ItemSelected" 
                                ItemTemplate="{StaticResource listItemTemplate}"/>
    </phone:PanoramaItem>
</phone:Panorama>

        <!--Uncomment to see an alignment grid to help ensure your controls are
            aligned on common boundaries.  The image has a top margin of -32px to
            account for the System Tray. Set this to 0 (or remove the margin altogether)
            if the System Tray is hidden.

            Before shipping remove this XAML and the image itself.-->
        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->

    </Grid>
</phone:PhoneApplicationPage>